/*
    MediaCenterJS - A NodeJS based mediacenter solution

    Copyright (C) 2014 - Jan Smolders

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
body{overflow: hidden;}

.col-md-1 {
    width: 9.333333%;
}


header.side {
    padding-left:360px;
    padding-right: 360px;
}
header, header * {
    transition: none !important;
-webkit-transition: none !important;
}

#view-select {
    position: absolute;
    top: 0;
    right: 264px;
}

.view-select {
    padding: 20px;
    display: inline-block;
    background: #4B4C51;
    cursor:pointer;
    color:#fff;
    font-weight:500;
    width: auto;
    font-size: 16px;
}

.view-select:hover{
    background: #fb8521;
}

#show-playlist {
    background: #313234;
    margin: 0;
    height: 100%;
    margin-right: 10px;
}
#show-playlist i {
    height: 100%;
    line-height: 42px;
    margin: 0 5px;
    opacity: 1;
    cursor:pointer;
}

/** Library **/

body,
.container-fluid,
#library .row,
#library{overflow-x: hidden;}

.container-fluid{
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
}
.container-fluid.bottom {
    margin-bottom: 100px;
}

#library {
    float: left;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width:100%;
    padding-top: 15px;
    height:100%;
}

#library.side{
    width: 100%;
}
.side {
    padding-left:360px;
}

.album-wrapper {
    max-width: 270px;
    float: left;
}
#library .thumbnail{
    position:relative;
    cursor:pointer;
    overflow:hidden;
    padding:0;
    background:none;
    border:0;
    border-radius: 0;
}

#library [selected] .thumbnail {
    -webkit-transform: scale(1.05);
    z-index:3;
}
#library.side [selected] .thumbnail {
    -webkit-transform: scale(1.0);
}

#library [selected] .thumbnail .caption{
    height:80px;
    -webkit-transition: height 0.5s ease-in-out;
    -moz-transition: height 0.5s ease-in-out;
    -o-transition: height 0.5s ease-in-out;
    transition: height 0.5s ease-in-out;
}


#library .thumbnail .caption{
    height:0;
    padding:0;
    width:100%;
    background:#fff;
    position:absolute;
    bottom:0;
    left:0;
}

.row-tracks {
    padding-left: 5px;
    padding-right: 5px;
    -webkit-transition: none;
    transition: none;
}

#library .thumbnail .caption p{
    padding:9px;
    margin:0;
}

.rowtracks { width: 100% !important; float: left;}
#library.side .thumbnail img,
#library.side .thumbnail span{
    position:relative;
    cursor:pointer;
}

#library.side [selected] .thumbnail img,
#library.side [selected] .thumbnail span{
    opacity:1;
}

#library [selected] .thumbnail img {
    opacity:0.5;
}

.thumbnail .edit.icon{display:none;}
.thumbnail:hover .edit.icon{
    display:block;
    position:absolute;
    top:15px;
    right:5px;
    z-index:9;
}
.modal-body img{max-width:300px; max-height:400px;}

.album-title,
.album-artist,
.album-year{
    font-size:12px;
    font-weight:bold;
    width: 100%;
    clear:both;
    display:block;
}

.album-year{
    font-weight:300;
}

.album-title{
    height:20px;
    font-size:14px;
    max-width:250px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

#library .thumbnail .album-artist,
#library .thumbnail .album-year {
    font-weight: normal;
}

.album.current ol{
    list-style-type: decimal;
    list-style-position: inside;
    margin:0;
    padding:0;
}

.album-info{padding:10px; position: relative;}

/** Playlist **/

#playlist {
    float: left;
    width: 360px;
    background: #313234;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    top:0px;
    left:0px;
    bottom: 100px;
    z-index:9;
    -webkit-overflow-scrolling: touch;
}

#playlist h2 i,
header h1 i{
	cursor: pointer;
}

#playlist.ng-hide {
    display: block!important;
    -webkit-transform: translateX(-100%);
}

#playlist .album-info,
#playlist ol{
    background: #313234;
    z-index: 5;
    position: relative;
}

#playlist ol{
    background: #1f2022;
}

#playlist .album-wrapper{
    margin-top:360px;
    width:100%;
    max-width:100%;
    padding:20px 0 0 0;
}

#playlist h2 {
    z-index: 7;
    height: 60px;
    padding-left: 10px;
    width:100%;
    line-height: 60px;
    background: #262728;
    margin: 0;
    color: #fff;
    position: absolute;
}

#playlist h2 i{
    cursor: pointer;
    height: 100%;
    margin:0;
    width: 40px;
    line-height: inherit;
}
#playlist h2 i:hover {
    background: #fb8521;
    opacity: 0.99;/*deliberately not 1*/
}

#playlist ul{padding-bottom:50px; padding-top: 60px;}

#playlist img{
    margin-bottom:5px;
    cursor:pointer;
    max-width:360px;
    max-height:500px;
    position: fixed;
}
#playlist .album-title{font-size:14px;}
#playlist .album{ padding:0px;}

#tracklist li{height:auto!important;}

.album:first-child .trackview{
    padding-top:100px;
}

li.track{
    padding:15px;
    border:0;
    min-height: 25px;
    line-height: 25px;
    cursor:pointer;
    list-style: none;
    border-bottom:1px solid #313234;
}
#library li.track {
    margin-left: 240px;
    font-size: 1.1em;
}

#library li.track:last-child {
    margin-bottom: 50px;
}

li.track[selected]{ background:#444; }
#playlist ol li{list-style:none;}
#playlist ol li .play{
    visibility:hidden;
    font-size:12px;
    color:#fb8521;
}
#playlist .album.current ol li.current .play{ visibility:visible;}
#playlist .album ol{ padding-left:0;}
#playlist .controls {
    display: inline-block;
    width: 44px;
    vertical-align: top;
    margin-left: -4px;
}
#playlist .controls i{
    cursor: pointer;
    font-size:24px;
}
#playlist .album-info .controls {
    position: absolute;
    right:10px;
    top:12px;
}


#playlist .img-wrapper .icon {
    position: absolute;
    top: 0px;
    color: #f5f5f5;
    font-size: 24px;
    z-index: 1;
    cursor: pointer;
    background: #3B3F40;
    padding: 10px 5px;
    height: 48px;
    width: 44px;
}
#playlist .img-wrapper img {
    display: block;
    width:100%;
}
#playlist .img-wrapper .controls .reorder {
    background: rgba(58,62,63,0.82);
}
#playlist .img-wrapper .controls .icon {
    position: relative;
    top: 0;
    left: 0;
    vertical-align: top;
    margin: 0;
}
#playlist .img-wrapper .controls .icon::before {
    vertical-align: top;
}
#playlist .tracks .remove {
    height: 100%;
    padding: 5px;
    color: #e1e2e2;
    right:0 !important;
    background: none;
}
#playlist .tracks .remove:hover {
    color:#cfd0d0;
}
#playlist .list{  position: relative; overflow: hidden; height: 300px;}
#playlist .list:hover img{ opacity:0.3 }

/** Player **/

#player{
    width:100%;
    min-height:100px;
    background:#333;
    z-index:99;
    bottom:0;
    left: 0;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding:0;
}

#player.ng-hide {
    display: block!important;
    -webkit-transform: translateY(100%);
}


/** Fullscreen mode */

#player.fullscreen{
    min-height:100%;
    height:100%;
    z-index:900;
    background: #232323;
}

#player.fullscreen #playing-info{
    margin: 20% 20% 5%;
}

#player.fullscreen .nav{
    margin: 0 20%;
}
#player.fullscreen .ui.progress{
    position: absolute;
    top:0px;
    left:0;
    width:100%;
}

#player.fullscreen #playing-info .info .album-artist{font-size:35px;}
#player.fullscreen #playing-info .info .album-track{font-size:24px;}
#player.fullscreen  #playing-info img{ max-width:500px; max-height:500px;}

#player #playing-info { position:relative; overflow: hidden; float:left; padding-left: 0;}
#player #playing-info img{max-width:100px; max-height:100px; float:left; margin:0 20px 0px 0; }
#player #playing-info .info{float:left; color:#fff; font-size:16px; padding-top: 20px;}
#player #playing-info .info{float:left; color:#fff; font-size:16px; padding-top: 20px;}
#player #playing-info .info .album-artist {
    font-size: 20px;
}

#player i{
    display:block;
    padding:5px;
    float:left;
    font-size:24px;
    color:#f5f5f5;
    cursor:pointer;
}

#player .nav{ margin-left:20px; float:left; margin-top:20px; text-align: justify;}
#player .nav i {
    margin: 10px;
}
.track-number{
    color:#D1D1D1;
    display:inline-block;
    margin:0 5px;
    vertical-align: top;
}
.track-title {
    display: inline-block;
}

.ui.progress {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 0px;
    margin-bottom:0;
    padding:0;
}

.bar {
    display: block;
    height: 100%;
    background-color: #fb8521;
    webkit-transition: width 3s ease-in-out;
    -moz-transition: width 3s ease-in-out;
    -o-transition: width 3s ease-in-out;
    transition: width 3s ease-in-out;
    width:0%;
}


/* responsive tweaks */

@media (max-width:1138px){
    header.side .container {
        width: 100%;
    }
    header.side {
        padding-right: 0;
    }
}

@media (min-width:1138px){
    header.side .container {
        width: 750px
    }
}

@media (min-width:1362px){
    header.side .container {
        width: 970px
    }
}

@media (min-width:1570px){
    header.side .container {
        width: 1170px
    }
}

@media only screen and (min-width: 320px) and (max-width: 529px) {
    /* For phone layouts only */
    #library.side{display:none;}
    #playlist {padding-bottom:100px;}
}


/*500 + 360px+music width*/
@media (max-width:930px) {
    header.side #search {
        width: 50px;
        padding: 15px;
    }
    header.side #search:focus {
        width: 100%;
        padding: 21px;
    }
    header.side #view-select {
        right: 50px;
    }
}


@media (max-width: 600px) {
    #playlist {
        width: 100%;
        bottom:0;
    }

    .container-fluid{
        padding:0;
    }

    #library li.track:last-child {
        margin-bottom: 0px;
    }

    #player i{font-size:20px;}

    #player{min-height: 100px;}
    #player #playing-info .info {
        padding-left: 38px;
    }
    #player .nav{margin-bottom:20px;}
}


@media (max-height: 900px) {
    #playlist .img-wrapper img {
        max-height: 200px;
        max-width: 200px;
    }
    #playlist .album-wrapper {
        margin-top: 200px;
    }
}
@media (max-height: 700px) {
    #playlist .img-wrapper img {
        max-height: 100px;
        max-width: 100px;
        position: static;
        margin-bottom: 0;
    }
    #playlist .album-wrapper {
        margin-top: 0;
        position: relative;
        top: -100px;
    }
    #playlist .album-wrapper .album-info {
        left:100px;
    }
}
@media (max-width: 600px) {
    #library .rowtracks .thumbnail .caption {
        left: 70px;
        height: 70px;
        color: rgb(241, 241, 241);
        background: #3c3d41;
    }
    #library .rowtracks .thumbnail img {
        max-width: 70px;
        margin-left: 0;
    }
    #library .rowtracks .album-wrapper {
        max-width: 100%;
        width: 100%;
    }
    #library .rowtracks .thumbnail:hover {
        -webkit-transform: none;
    }
    #library .rowtracks {
        padding: 0;
    }
    #library .rowtracks ol {
        margin-top: 70px;
        padding-left: 0;
    }
    #library .rowtracks li.track {
        margin-left: 0;
    }
}
